#pragma once

#include "primitive.h"
#include "vector3.h"

namespace raytrace {

struct Material;

class Plane : public Primitive {
 public:
  Plane(Vector3Arg normal, float dist, const Material* material);
  virtual ~Plane() {}

  virtual bool IntersectsWith(const Ray& r, float& d) const;
  virtual Vector3 NormalAt(Vector3Arg pt) const;

  virtual Vector3 GetRandomPoint() const;

 private:
  Vector3 normal_;
  float dist_;
};
}
